<%@ page language="java" contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>在线录音</title>
<script src="<%=request.getContextPath()%>/manage/js/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/manage/js/record/js/swfobject.js"></script>  
    <script type="text/javascript" src="<%=request.getContextPath()%>/manage/js/record/js/recorder.js"></script>  
    <script type="text/javascript" src="<%=request.getContextPath()%>/manage/js/record/js/main.js"></script>  
    <link rel="stylesheet" href="<%=request.getContextPath()%>/manage/js/record/style.css">  
<script type="text/javascript">

function record()
{
	//document.getElementById("uploadForm");
	FWRecorder.record('audio', 'audio.wav');
	return false;
	}
</script>
</head>
 <body>
     <div class="qcontainer">  
            <div id="recorder-audio" class="control_panel idle">  
                <button type="button" class="record_button" onclick="record();" title="Record">  
                    <img src="<%=request.getContextPath()%>/manage/js/record/images/record.png" alt="Record" />  
                </button>  
                <button class="stop_recording_button" onclick="FWRecorder.stopRecording('audio');" title="Stop Recording">  
                    <img src="<%=request.getContextPath()%>/manage/js/record/images/stop.png" alt="Stop Recording" />  
                </button>  
                <button class="play_button" onclick="FWRecorder.playBack('audio');" title="Play">  
                    <img src="<%=request.getContextPath()%>/manage/js/record/images/play.png" alt="Play" />  
                </button>  
                <button class="pause_playing_button" onclick="FWRecorder.pausePlayBack('audio');" title="Pause Playing">  
                    <img src="<%=request.getContextPath()%>/manage/js/record/images/pause.png" alt="Pause Playing" />  
                </button>  
                <button class="stop_playing_button" onclick="FWRecorder.stopPlayBack();" title="Stop Playing">  
                    <img src="<%=request.getContextPath()%>/manage/js/record/images/stop.png" alt="Stop Playing" />  
                </button>  
                <div class="level"></div>  
            </div>  
        
            <div class="details">  
                <button class="show_level" onclick="FWRecorder.observeLevel();">显示声波</button>  
                <button class="hide_level" onclick="FWRecorder.stopObservingLevel();" style="display: none;">隐藏声波</button>  
                <button class="show_settings" onclick="microphonePermission()">麦克风权限</button>  
                <span id="save_button" style="display:inline-block;">   
                    <span id="flashcontent">  
                        <p>您的浏览器必须支持Javascript,而且安装了Flash播放器！</p>   
                    </span>   
                </span>  
                <div id="status">录音状态。。。</div>  
                <div>录音时长：<span id="duration"></span></div>  
                <div>上传状态：<span id="upload_status"></span></div>  
                <input type="hidden" id="qrecordId"/>  
            </div>  
          
            <form id="uploadForm" name="uploadForm" action="upload.do" enctype="multipart/form-data">  
                <input name="authenticity_token" value="xxxxx" type="hidden">  
            <input name="upload_file[parent_id]" value="1" type="hidden">  
                <input name="format" value="json" type="text">  
          </form>   
        </div>  
   </body>
</html>